package com.cz.zzl.buffer;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CopyTextByBuf {

	public static void main(String[] args) throws IOException {
		FileReader fw = new FileReader("buffer.txt");
		BufferedReader bufr = new BufferedReader(fw);
		FileWriter fr = new FileWriter("buffer_copy.txt");
        BufferedWriter bufw = new BufferedWriter(fr);
        String len = null;
        while((len=bufr.readLine())!=null){
        	bufw.write(len);
        	bufw.newLine();
        }
        bufr.close();
        bufw.close();
	}

}
